package com.hzsai.controller;

import com.hzsai.pojo.DemoUser;
import com.hzsai.service.DemoUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * hzsai 2019/8/12
 * usage:
 **/
@RestController
@RequestMapping(value = "/demouser")
public class DemoUserController {

    @Autowired
    DemoUserService service;

    @GetMapping("/getUser/{id}")
    public DemoUser getUser(@PathVariable long id) {
        return service.Sel(id);
    }
}
